﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Catering.Catering_Page.Caipin
{
    public partial class Caipu_Set : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ViewState["html"] = GetHtml();
        }

        public string GetHtml()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            Catering_Rules.library crl =new Catering_Rules.library();
            DataSet ds = crl.GetAllList();
            if (ds != null && ds.Tables.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                if (dt != null && dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        sb.Append("<tr >" );

                        sb.Append(" <td class=\"xh_td\">" + dr["id"] + "</td>");
                          sb.Append("  <td>"+dr["LName"]+"</td>" );
                          sb.Append("  <td>" );
                          sb.Append(  "<select id=\"renyuan\" style=\"width:100px\">" );
                          sb.Append(  "<option value=\"0\">苯作业人员</option>" );
                           sb.Append( "<option value=\"1\">铅作业人员</option>" );
                          sb.Append(  "<option value=\"2\">高温作业人员</option>" );
                          sb.Append(  "<option value=\"3\">低温作业人员</option>" );
                          sb.Append(  "<option value=\"4\">刺激性气体接触人员</option>" );
                          sb.Append(  "<option value=\"5\">航海人员</option>" );
                          sb.Append(  "<option value=\"6\">晕船人员</option>" );
                          sb.Append(  "</select>" );
                          sb.Append(  "</td>" );
                          sb.Append("<td>" + dr["Back"] + "</td>");
                          sb.Append("<td align=\"center\"><a href=\"#\"> <img src=\"../../Images/trash.gif\" onclick=\"del_row_click(" + dr["id"] + ")\" /></a></td>");
                          sb.Append("</tr>");
                    }
                }
            }
            return sb.ToString();
        }
    }
}